Skip to content

Migrate internal apis to environment component #9291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2025

Conversation

PerfectSlayer
Copy link
Contributor

@PerfectSlayer PerfectSlayer commented Aug 1, 2025

What Does This Do

This PR migrate internal-api module to the new environment component

Motivation

Additional Notes

Environment component related stacked PRs:

Contributor Checklist

Jira ticket: LANGPLAT-458

@PerfectSlayer PerfectSlayer requested review from a team as code owners August 1, 2025 10:17
@PerfectSlayer PerfectSlayer requested review from sarahchen6 and removed request for a team August 1, 2025 10:17
@PerfectSlayer PerfectSlayer added comp: core Tracer core tag: no release notes Changes to exclude from release notes labels Aug 1, 2025
@PerfectSlayer PerfectSlayer requested a review from smola August 1, 2025 10:17
return Stream.of("TMP", "TEMP", "USERPROFILE")
.map(EnvironmentVariables::get)
.filter(Objects::nonNull)
.filter(((Predicate<String>) String::isEmpty).negate())
Copy link
Contributor Author

@PerfectSlayer PerfectSlayer Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 notes: This behavior change (empty --> !empty) is expected. It’s a fix to the PidHelper on Windows platform and was confirmed with the author first.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add some comment about that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarification, what kind of comment do you expect here?

One of the next step for the environment component will be to handle the "temp dir" computation.
So feedback about it would be useful for this part too 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment that will explain this non obvious empty --> !empty on Windows.

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Aug 1, 2025

Code coverage: total 57.35%, base diff 0.01%, patch 32.61% (view details)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f17f23d | Docs | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Aug 1, 2025

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1754063597 1754063943
end_time 2025-08-01T15:54:38 2025-08-01T16:00:24
git_branch master bbujon/environment-step2
git_commit_sha 023e525 2f67106
start_time 2025-08-01T15:53:18 2025-08-01T15:59:04
See matching parameters
Baseline Candidate
ci_job_id 1060448361 1060448361
ci_pipeline_id 72450153 72450153
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1754062935 1754062935

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics.

See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-49.470µs; +20.719µs] or [-17.071%; +7.150%]
unstable
[-66.102µs; +27.727µs] or [-19.831%; +8.318%]
unstable
[-76.633µs; +36.018µs] or [-21.992%; +10.336%]
unstable
[-423.330µs; +199.201µs] or [-39.480%; +18.578%]
same
scenario:basic same same same unstable
[-48.737µs; +154.359µs] or [-6.562%; +20.783%]
unstable
[-77.764op/s; +220.011op/s] or [-2.955%; +8.360%]
scenario:loop same unsure
[+0.717µs; +12.412µs] or [+0.008%; +0.138%]
same same same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (333.331 µs) : 276, 391
.   : milestone, 333,
basic (279.563 µs) : 273, 286
.   : milestone, 280,
loop (8.969 ms) : 8964, 8975
.   : milestone, 8969,
section candidate
noprobe (314.144 µs) : 288, 340
.   : milestone, 314,
basic (277.345 µs) : 271, 284
.   : milestone, 277,
loop (8.976 ms) : 8971, 8982
.   : milestone, 8976,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 333.331 µs [275.929 µs, 390.733 µs]
basic 279.563 µs [273.258 µs, 285.869 µs]
loop 8.969 ms [8.964 ms, 8.975 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 314.144 µs [287.796 µs, 340.492 µs]
basic 277.345 µs [270.56 µs, 284.129 µs]
loop 8.976 ms [8.971 ms, 8.982 ms]

@pr-commenter
Copy link

pr-commenter bot commented Aug 1, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/environment-step2
git_commit_date 1755127609 1755172103
git_commit_sha 0f3ab90 f17f23d
release_version 1.53.0-SNAPSHOT~0f3ab90a6f 1.53.0-SNAPSHOT~f17f23d937
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1755174014 1755174014
ci_job_id 1080242938 1080242938
ci_pipeline_id 73668253 73668253
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-dw3faen1 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-dw3faen1 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 14 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~f17f23d937, baseline=1.53.0-SNAPSHOT~0f3ab90a6f

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.049 s) : 0, 1049251
Total [baseline] (8.609 s) : 0, 8609078
Agent [candidate] (1.042 s) : 0, 1042053
Total [candidate] (8.577 s) : 0, 8576719
section iast
Agent [baseline] (1.174 s) : 0, 1174373
Total [baseline] (9.267 s) : 0, 9267309
Agent [candidate] (1.182 s) : 0, 1181700
Total [candidate] (9.306 s) : 0, 9305784
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.049 s -
Agent iast 1.174 s 125.123 ms (11.9%)
Total tracing 8.609 s -
Total iast 9.267 s 658.231 ms (7.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.042 s -
Agent iast 1.182 s 139.647 ms (13.4%)
Total tracing 8.577 s -
Total iast 9.306 s 729.066 ms (8.5%)
gantt
    title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~f17f23d937, baseline=1.53.0-SNAPSHOT~0f3ab90a6f

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.436 ms) : 0, 1436
crashtracking [candidate] (1.413 ms) : 0, 1413
BytebuddyAgent [baseline] (735.034 ms) : 0, 735034
BytebuddyAgent [candidate] (729.656 ms) : 0, 729656
GlobalTracer [baseline] (242.646 ms) : 0, 242646
GlobalTracer [candidate] (241.285 ms) : 0, 241285
AppSec [baseline] (30.112 ms) : 0, 30112
AppSec [candidate] (30.062 ms) : 0, 30062
Debugger [baseline] (6.057 ms) : 0, 6057
Debugger [candidate] (5.993 ms) : 0, 5993
Remote Config [baseline] (647.762 µs) : 0, 648
Remote Config [candidate] (647.514 µs) : 0, 648
Telemetry [baseline] (12.301 ms) : 0, 12301
Telemetry [candidate] (12.122 ms) : 0, 12122
section iast
crashtracking [baseline] (1.432 ms) : 0, 1432
crashtracking [candidate] (1.439 ms) : 0, 1439
BytebuddyAgent [baseline] (848.05 ms) : 0, 848050
BytebuddyAgent [candidate] (853.907 ms) : 0, 853907
GlobalTracer [baseline] (232.32 ms) : 0, 232320
GlobalTracer [candidate] (233.252 ms) : 0, 233252
IAST [baseline] (29.786 ms) : 0, 29786
IAST [candidate] (27.466 ms) : 0, 27466
AppSec [baseline] (27.278 ms) : 0, 27278
AppSec [candidate] (27.477 ms) : 0, 27477
Debugger [baseline] (5.709 ms) : 0, 5709
Debugger [candidate] (8.259 ms) : 0, 8259
Remote Config [baseline] (581.261 µs) : 0, 581
Remote Config [candidate] (578.513 µs) : 0, 579
Telemetry [baseline] (8.32 ms) : 0, 8320
Telemetry [candidate] (8.272 ms) : 0, 8272
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~f17f23d937, baseline=1.53.0-SNAPSHOT~0f3ab90a6f

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.046 s) : 0, 1046265
Total [baseline] (10.784 s) : 0, 10783647
Agent [candidate] (1.058 s) : 0, 1058242
Total [candidate] (10.807 s) : 0, 10807084
section appsec
Agent [baseline] (1.22 s) : 0, 1219873
Total [baseline] (10.886 s) : 0, 10885745
Agent [candidate] (1.227 s) : 0, 1227208
Total [candidate] (10.864 s) : 0, 10863808
section iast
Agent [baseline] (1.177 s) : 0, 1177240
Total [baseline] (10.892 s) : 0, 10892177
Agent [candidate] (1.177 s) : 0, 1177131
Total [candidate] (10.905 s) : 0, 10904859
section profiling
Agent [baseline] (1.191 s) : 0, 1190562
Total [baseline] (10.871 s) : 0, 10870567
Agent [candidate] (1.19 s) : 0, 1189670
Total [candidate] (10.857 s) : 0, 10856675
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.046 s -
Agent appsec 1.22 s 173.608 ms (16.6%)
Agent iast 1.177 s 130.975 ms (12.5%)
Agent profiling 1.191 s 144.297 ms (13.8%)
Total tracing 10.784 s -
Total appsec 10.886 s 102.097 ms (0.9%)
Total iast 10.892 s 108.53 ms (1.0%)
Total profiling 10.871 s 86.92 ms (0.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.058 s -
Agent appsec 1.227 s 168.966 ms (16.0%)
Agent iast 1.177 s 118.889 ms (11.2%)
Agent profiling 1.19 s 131.427 ms (12.4%)
Total tracing 10.807 s -
Total appsec 10.864 s 56.723 ms (0.5%)
Total iast 10.905 s 97.775 ms (0.9%)
Total profiling 10.857 s 49.59 ms (0.5%)
gantt
    title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~f17f23d937, baseline=1.53.0-SNAPSHOT~0f3ab90a6f

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.422 ms) : 0, 1422
crashtracking [candidate] (1.452 ms) : 0, 1452
BytebuddyAgent [baseline] (733.361 ms) : 0, 733361
BytebuddyAgent [candidate] (741.2 ms) : 0, 741200
GlobalTracer [baseline] (242.579 ms) : 0, 242579
GlobalTracer [candidate] (244.833 ms) : 0, 244833
AppSec [baseline] (30.278 ms) : 0, 30278
AppSec [candidate] (30.473 ms) : 0, 30473
Debugger [baseline] (6.075 ms) : 0, 6075
Debugger [candidate] (6.117 ms) : 0, 6117
Remote Config [baseline] (660.331 µs) : 0, 660
Remote Config [candidate] (660.222 µs) : 0, 660
Telemetry [baseline] (10.833 ms) : 0, 10833
Telemetry [candidate] (12.292 ms) : 0, 12292
section appsec
crashtracking [baseline] (1.425 ms) : 0, 1425
crashtracking [candidate] (1.442 ms) : 0, 1442
BytebuddyAgent [baseline] (751.934 ms) : 0, 751934
BytebuddyAgent [candidate] (758.133 ms) : 0, 758133
GlobalTracer [baseline] (235.617 ms) : 0, 235617
GlobalTracer [candidate] (236.255 ms) : 0, 236255
IAST [baseline] (23.734 ms) : 0, 23734
IAST [candidate] (23.735 ms) : 0, 23735
AppSec [baseline] (169.643 ms) : 0, 169643
AppSec [candidate] (169.314 ms) : 0, 169314
Debugger [baseline] (6.551 ms) : 0, 6551
Debugger [candidate] (7.27 ms) : 0, 7270
Remote Config [baseline] (616.254 µs) : 0, 616
Remote Config [candidate] (630.953 µs) : 0, 631
Telemetry [baseline] (9.286 ms) : 0, 9286
Telemetry [candidate] (9.212 ms) : 0, 9212
section iast
crashtracking [baseline] (1.436 ms) : 0, 1436
crashtracking [candidate] (1.443 ms) : 0, 1443
BytebuddyAgent [baseline] (849.806 ms) : 0, 849806
BytebuddyAgent [candidate] (849.572 ms) : 0, 849572
GlobalTracer [baseline] (232.476 ms) : 0, 232476
GlobalTracer [candidate] (233.177 ms) : 0, 233177
IAST [baseline] (31.533 ms) : 0, 31533
IAST [candidate] (28.378 ms) : 0, 28378
AppSec [baseline] (24.501 ms) : 0, 24501
AppSec [candidate] (28.805 ms) : 0, 28805
Debugger [baseline] (7.582 ms) : 0, 7582
Debugger [candidate] (5.731 ms) : 0, 5731
Remote Config [baseline] (591.796 µs) : 0, 592
Remote Config [candidate] (595.162 µs) : 0, 595
Telemetry [baseline] (8.381 ms) : 0, 8381
Telemetry [candidate] (8.321 ms) : 0, 8321
section profiling
crashtracking [baseline] (1.417 ms) : 0, 1417
crashtracking [candidate] (1.395 ms) : 0, 1395
BytebuddyAgent [baseline] (758.44 ms) : 0, 758440
BytebuddyAgent [candidate] (757.891 ms) : 0, 757891
GlobalTracer [baseline] (220.873 ms) : 0, 220873
GlobalTracer [candidate] (221.159 ms) : 0, 221159
AppSec [baseline] (29.819 ms) : 0, 29819
AppSec [candidate] (29.865 ms) : 0, 29865
Debugger [baseline] (6.32 ms) : 0, 6320
Debugger [candidate] (6.269 ms) : 0, 6269
Remote Config [baseline] (661.076 µs) : 0, 661
Remote Config [candidate] (718.168 µs) : 0, 718
Telemetry [baseline] (15.226 ms) : 0, 15226
Telemetry [candidate] (15.906 ms) : 0, 15906
ProfilingAgent [baseline] (108.494 ms) : 0, 108494
ProfilingAgent [candidate] (107.159 ms) : 0, 107159
Profiling [baseline] (109.129 ms) : 0, 109129
Profiling [candidate] (107.786 ms) : 0, 107786
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/environment-step2
git_commit_date 1755127609 1755172103
git_commit_sha 0f3ab90 f17f23d
release_version 1.53.0-SNAPSHOT~0f3ab90a6f 1.53.0-SNAPSHOT~f17f23d937
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1755173684 1755173684
ci_job_id 1080242939 1080242939
ci_pipeline_id 73668253 73668253
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-1-96g5lvh6 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-1-96g5lvh6 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 12 unstable metrics.

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:petclinic:iast:high_load better
[-1.852ms; -1.003ms] or [-3.983%; -2.159%]
unstable
[-2.901op/s; +11.880op/s] or [-2.882%; +11.801%]
45.058ms 105.152op/s 46.486ms 100.662op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~f17f23d937, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.377 ms) : 4329, 4425
.   : milestone, 4377,
iast (9.587 ms) : 9421, 9753
.   : milestone, 9587,
iast_FULL (14.108 ms) : 13827, 14389
.   : milestone, 14108,
iast_GLOBAL (10.344 ms) : 10143, 10546
.   : milestone, 10344,
profiling (9.125 ms) : 8975, 9274
.   : milestone, 9125,
tracing (7.592 ms) : 7480, 7704
.   : milestone, 7592,
section candidate
no_agent (4.477 ms) : 4419, 4535
.   : milestone, 4477,
iast (9.292 ms) : 9140, 9444
.   : milestone, 9292,
iast_FULL (14.461 ms) : 14178, 14743
.   : milestone, 14461,
iast_GLOBAL (10.011 ms) : 9823, 10199
.   : milestone, 10011,
profiling (9.283 ms) : 9115, 9451
.   : milestone, 9283,
tracing (7.818 ms) : 7707, 7928
.   : milestone, 7818,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.377 ms [4.329 ms, 4.425 ms] -
iast 9.587 ms [9.421 ms, 9.753 ms] 5.21 ms (119.0%)
iast_FULL 14.108 ms [13.827 ms, 14.389 ms] 9.731 ms (222.3%)
iast_GLOBAL 10.344 ms [10.143 ms, 10.546 ms] 5.967 ms (136.3%)
profiling 9.125 ms [8.975 ms, 9.274 ms] 4.748 ms (108.5%)
tracing 7.592 ms [7.48 ms, 7.704 ms] 3.215 ms (73.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.477 ms [4.419 ms, 4.535 ms] -
iast 9.292 ms [9.14 ms, 9.444 ms] 4.815 ms (107.5%)
iast_FULL 14.461 ms [14.178 ms, 14.743 ms] 9.983 ms (223.0%)
iast_GLOBAL 10.011 ms [9.823 ms, 10.199 ms] 5.534 ms (123.6%)
profiling 9.283 ms [9.115 ms, 9.451 ms] 4.806 ms (107.3%)
tracing 7.818 ms [7.707 ms, 7.928 ms] 3.34 ms (74.6%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~f17f23d937, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
    dateFormat X
    axisFormat %s
section baseline
no_agent (36.917 ms) : 36613, 37221
.   : milestone, 36917,
appsec (47.753 ms) : 47321, 48184
.   : milestone, 47753,
code_origins (45.587 ms) : 45205, 45969
.   : milestone, 45587,
iast (46.486 ms) : 46077, 46895
.   : milestone, 46486,
profiling (49.4 ms) : 48971, 49828
.   : milestone, 49400,
tracing (43.583 ms) : 43221, 43944
.   : milestone, 43583,
section candidate
no_agent (36.791 ms) : 36493, 37088
.   : milestone, 36791,
appsec (47.196 ms) : 46774, 47618
.   : milestone, 47196,
code_origins (44.574 ms) : 44196, 44953
.   : milestone, 44574,
iast (45.058 ms) : 44680, 45437
.   : milestone, 45058,
profiling (49.063 ms) : 48606, 49521
.   : milestone, 49063,
tracing (44.17 ms) : 43813, 44527
.   : milestone, 44170,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 36.917 ms [36.613 ms, 37.221 ms] -
appsec 47.753 ms [47.321 ms, 48.184 ms] 10.836 ms (29.4%)
code_origins 45.587 ms [45.205 ms, 45.969 ms] 8.67 ms (23.5%)
iast 46.486 ms [46.077 ms, 46.895 ms] 9.569 ms (25.9%)
profiling 49.4 ms [48.971 ms, 49.828 ms] 12.483 ms (33.8%)
tracing 43.583 ms [43.221 ms, 43.944 ms] 6.666 ms (18.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 36.791 ms [36.493 ms, 37.088 ms] -
appsec 47.196 ms [46.774 ms, 47.618 ms] 10.406 ms (28.3%)
code_origins 44.574 ms [44.196 ms, 44.953 ms] 7.784 ms (21.2%)
iast 45.058 ms [44.68 ms, 45.437 ms] 8.268 ms (22.5%)
profiling 49.063 ms [48.606 ms, 49.521 ms] 12.272 ms (33.4%)
tracing 44.17 ms [43.813 ms, 44.527 ms] 7.379 ms (20.1%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/environment-step2
git_commit_date 1755127609 1755172103
git_commit_sha 0f3ab90 f17f23d
release_version 1.53.0-SNAPSHOT~0f3ab90a6f 1.53.0-SNAPSHOT~f17f23d937
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1755174220 1755174220
ci_job_id 1080242940 1080242940
ci_pipeline_id 73668253 73668253
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-2-42hmypdt 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-2-42hmypdt 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~f17f23d937, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.325 s) : 15325000, 15325000
.   : milestone, 15325000,
appsec (14.905 s) : 14905000, 14905000
.   : milestone, 14905000,
iast (18.496 s) : 18496000, 18496000
.   : milestone, 18496000,
iast_GLOBAL (18.151 s) : 18151000, 18151000
.   : milestone, 18151000,
profiling (15.299 s) : 15299000, 15299000
.   : milestone, 15299000,
tracing (15.161 s) : 15161000, 15161000
.   : milestone, 15161000,
section candidate
no_agent (14.954 s) : 14954000, 14954000
.   : milestone, 14954000,
appsec (14.986 s) : 14986000, 14986000
.   : milestone, 14986000,
iast (18.348 s) : 18348000, 18348000
.   : milestone, 18348000,
iast_GLOBAL (18.233 s) : 18233000, 18233000
.   : milestone, 18233000,
profiling (15.389 s) : 15389000, 15389000
.   : milestone, 15389000,
tracing (15.079 s) : 15079000, 15079000
.   : milestone, 15079000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.325 s [15.325 s, 15.325 s] -
appsec 14.905 s [14.905 s, 14.905 s] -420.0 ms (-2.7%)
iast 18.496 s [18.496 s, 18.496 s] 3.171 s (20.7%)
iast_GLOBAL 18.151 s [18.151 s, 18.151 s] 2.826 s (18.4%)
profiling 15.299 s [15.299 s, 15.299 s] -26.0 ms (-0.2%)
tracing 15.161 s [15.161 s, 15.161 s] -164.0 ms (-1.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.954 s [14.954 s, 14.954 s] -
appsec 14.986 s [14.986 s, 14.986 s] 32.0 ms (0.2%)
iast 18.348 s [18.348 s, 18.348 s] 3.394 s (22.7%)
iast_GLOBAL 18.233 s [18.233 s, 18.233 s] 3.279 s (21.9%)
profiling 15.389 s [15.389 s, 15.389 s] 435.0 ms (2.9%)
tracing 15.079 s [15.079 s, 15.079 s] 125.0 ms (0.8%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~f17f23d937, baseline=1.53.0-SNAPSHOT~0f3ab90a6f
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.473 ms) : 1462, 1485
.   : milestone, 1473,
appsec (3.67 ms) : 3453, 3887
.   : milestone, 3670,
iast (2.198 ms) : 2135, 2260
.   : milestone, 2198,
iast_GLOBAL (2.239 ms) : 2175, 2302
.   : milestone, 2239,
profiling (2.065 ms) : 2013, 2117
.   : milestone, 2065,
tracing (2.016 ms) : 1967, 2064
.   : milestone, 2016,
section candidate
no_agent (1.476 ms) : 1465, 1488
.   : milestone, 1476,
appsec (3.583 ms) : 3371, 3796
.   : milestone, 3583,
iast (2.2 ms) : 2138, 2263
.   : milestone, 2200,
iast_GLOBAL (2.24 ms) : 2178, 2303
.   : milestone, 2240,
profiling (2.057 ms) : 2005, 2109
.   : milestone, 2057,
tracing (2.02 ms) : 1971, 2069
.   : milestone, 2020,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.473 ms [1.462 ms, 1.485 ms] -
appsec 3.67 ms [3.453 ms, 3.887 ms] 2.197 ms (149.1%)
iast 2.198 ms [2.135 ms, 2.26 ms] 724.356 µs (49.2%)
iast_GLOBAL 2.239 ms [2.175 ms, 2.302 ms] 765.483 µs (52.0%)
profiling 2.065 ms [2.013 ms, 2.117 ms] 591.335 µs (40.1%)
tracing 2.016 ms [1.967 ms, 2.064 ms] 542.238 µs (36.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.476 ms [1.465 ms, 1.488 ms] -
appsec 3.583 ms [3.371 ms, 3.796 ms] 2.107 ms (142.7%)
iast 2.2 ms [2.138 ms, 2.263 ms] 723.759 µs (49.0%)
iast_GLOBAL 2.24 ms [2.178 ms, 2.303 ms] 763.832 µs (51.7%)
profiling 2.057 ms [2.005 ms, 2.109 ms] 580.51 µs (39.3%)
tracing 2.02 ms [1.971 ms, 2.069 ms] 543.536 µs (36.8%)

@PerfectSlayer PerfectSlayer force-pushed the bbujon/environment-step1 branch from d6e835b to c63c1f8 Compare August 1, 2025 14:49
@PerfectSlayer PerfectSlayer requested review from a team as code owners August 1, 2025 14:49
@PerfectSlayer PerfectSlayer requested review from jpbempel, nikita-tkachenko-datadog and sezen-datadog and removed request for a team August 1, 2025 14:49
@PerfectSlayer PerfectSlayer force-pushed the bbujon/environment-step2 branch from 3d69117 to 2f67106 Compare August 1, 2025 15:43
@PerfectSlayer
Copy link
Contributor Author

Stacked PR broke when rebasing from GH following the Gradle smoke test fix.
It’s only the last commit to review. I will sync the PR once #9290 is merged.

Comment on lines 14 to 17
public static CiEnvironment local() {
Map<String, String> env;
try {
env = System.getenv();
} catch (SecurityException e) {
env = Collections.emptyMap();
}
return new CiEnvironmentImpl(env);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% but maybe this class can be refactored to use datadog.environment.EnvironmentVariables instead of caching System.getenv() in private map?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far, I did not expose the "get all" API in the environment components.
So I only added safe access from the code that use it.

Do you think it would be better to offer the "get all" API in SystemProperties and EnvironmentVariable?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it would be better to offer the "get all" API in SystemProperties and EnvironmentVariable?

I like this, since the same security exception could occur with get all

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as we have special dedicated classes to work with env and props, better to have one to rule them all :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added new API to cover those use case.
They were part of another stacked PR, I don't know how they end up for review here.
It will increase the scope of this PR but it's needed to get approval 😅

Comment on lines 142 to 149
Properties systemProperties = System.getProperties();
for (Map.Entry<Object, Object> e : systemProperties.entrySet()) {
String propertyName = (String) e.getKey();
Object propertyValue = e.getValue();
if ((propertyName.startsWith(Config.PREFIX)
|| propertyName.startsWith("datadog.slf4j.simpleLogger.defaultLogLevel"))
&& propertyValue != null) {
propagatedSystemProperties.put(propertyName, propertyValue.toString());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, can it be refactored to use SystemProperties?

if (systemProperties.containsKey(
propertyNameToSystemPropertyName(
CiVisibilityConfig.CIVISIBILITY_INJECTED_TRACER_VERSION))) {
if (SystemProperties.get(propertyNameToSystemPropertyName(CIVISIBILITY_INJECTED_TRACER_VERSION))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this long SystemProperties.get(propertyNameToSystemPropertyName(..) can be part of SystemProperties with some shorter and more convenient method name?
Just thinking out loud, if we can improve readability here and similar places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would bring config concern to the environment component.
I would rather avoiding it to keep bot separated.

return Stream.of("TMP", "TEMP", "USERPROFILE")
.map(EnvironmentVariables::get)
.filter(Objects::nonNull)
.filter(((Predicate<String>) String::isEmpty).negate())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add some comment about that?

@PerfectSlayer PerfectSlayer force-pushed the bbujon/environment-step1 branch from c63c1f8 to 3925256 Compare August 1, 2025 17:54
Base automatically changed from bbujon/environment-step1 to master August 1, 2025 19:10
@PerfectSlayer PerfectSlayer force-pushed the bbujon/environment-step2 branch from 2f67106 to 29fea0d Compare August 1, 2025 19:53
@PerfectSlayer PerfectSlayer removed the request for review from a team August 4, 2025 08:54
Copy link
Contributor

@mhlidd mhlidd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. FYI I will also migrate most of the calls to Environment component to call ConfigHelper when the Config Inversion PR is ready.

@PerfectSlayer PerfectSlayer force-pushed the bbujon/environment-step2 branch from 29fea0d to 7aef877 Compare August 14, 2025 11:39
Comment on lines +57 to +66
try {
Map<String, String> map = new HashMap<>();
for (String propertyName : System.getProperties().stringPropertyNames()) {
map.put(propertyName, System.getProperty(propertyName));
}
return unmodifiableMap(map);
} catch (SecurityException ignored) {
return emptyMap();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just thinking out loud here...
Is that OK that we stop iterating on first SecurityException?
Would it make sense to test each property and ignore only those that failed?
But potentially that could be slow...

@PerfectSlayer PerfectSlayer enabled auto-merge (squash) August 14, 2025 14:16
@PerfectSlayer PerfectSlayer merged commit 12e10fb into master Aug 14, 2025
656 of 668 checks passed
@PerfectSlayer PerfectSlayer deleted the bbujon/environment-step2 branch August 14, 2025 14:17
@github-actions github-actions bot added this to the 1.53.0 milestone Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants